<script type="text/javascript" src="js/StackMdEditor.js"></script>
<script type="text/javascript" src="js/CommonEditor.js"></script>

<style type="text/css" media="screen">
  body {
      overflow: hidden;
  }

  #editor {
      margin: 0 0 0 0;
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
  }
</style>

<!--编辑器的样式提取-->
<style>
	.stackedit-no-overflow {
		overflow: hidden;
	}

	.stackedit-container {
		background-color: rgba(160, 160, 160, 0.5);
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 9999;
	}

	.stackedit-hidden-container {
		position: absolute;
		width: 10px;
		height: 10px;
		left: -99px;
	}

	.stackedit-iframe-container {
		background-color: #fff;
		position: absolute;
		margin: auto;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		height: 100%;
		width: 100%;
		border-radius: 2px;
		overflow: hidden;
	}

	.stackedit-iframe {
		position: absolute;
		height: 100%;
		width: 100%;
		border: 0;
		border-radius: 2px;
	}

	@media (max-width: 740px) {
		.stackedit-iframe-container {
			height: 100%;
			width: 100%;
			border-radius: 0;
		}

		.stackedit-iframe {
			border-radius: 0;
		}
	}

	.stackedit-close-button {
		position: absolute !important;
		box-sizing: border-box !important;
		width: 38px !important;
		height: 36px !important;
		margin: 4px !important;
		padding: 0 4px !important;
		text-align: center !important;
		vertical-align: middle !important;
		text-decoration: none !important;
	}
</style>

<div id="textEditor">
	<div class="textEditorContent" style="min-height: 600px;">
		<div id="editor">
			<div class="stackedit-container">
				<div class="stackedit-iframe-container">
					<iframe class="stackedit-iframe" src="#" width="100%" height="100%"></iframe>
				</div>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript">
	//获取窗口的高度并设置高度
	var height =  getWinHeight()-100;
	var width = getWinWidth();
	document.getElementById('textEditor').style.height = height + "px";
	document.getElementById('textEditor').style.width = width + "px";
	
	//PageInit在DocSys.js中创建窗口的回调时会调用，这里不用处理
	//StackMdEditor.PageInit(docInfo);
</script>


